import request from '/src/axios.js';
import {baseUrl} from "../../config/env";

export const ossApi = {
  getList: (current, size, params) => request({
    url: baseUrl + '/api-oss/oss/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  }),
  getDetail: (id) => request({
    url: baseUrl + '/api-oss/oss/detail',
    method: 'get',
    params: {
      id
    }
  }),
  remove: (ids) => request({
    url: baseUrl + '/api-oss/oss/' + ids,
    method: 'delete',
    // params: {
    //   ids,o
    // }
  }),
  add: (row) => request({
    url: baseUrl + '/api-oss/oss/submit',
    method: 'post',
    data: row
  }),
  update: (row) => request({
    url: baseUrl + '/api-oss/oss/submit',
    method: 'post',
    data: row
  }),
  uploadBase64: (row) => request({
    url: baseUrl + '/api-oss/oss/uploadBase64',
    method: 'post',
    data: row
  }),
  upload: (row) => request({
    url: baseUrl + "/api-oss/oss/upload",
    method: 'post',
    data: row
  })
}
